package br.com.advance.automacao.services.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import br.com.advance.automacao.enumeration.Fabricante;
import br.com.advance.automacao.services.CLPConnector;
import br.com.advance.automacao.services.CLPConnectorFactory;
import br.com.advance.automacao.services.EthernetIp4JService;

@Component(value="clpConnectorFactory")
public class CLPConnectorFactoryImpl implements CLPConnectorFactory {

	@Autowired
    private EthernetIp4JService ethernetIp4JService;

	public CLPConnector getCLPConector(Fabricante tipo) {
		if(Fabricante.R.equals(tipo)) {
			return ethernetIp4JService;
		}
		return null;
	}

}
